-
Notifications
You must be signed in to change notification settings - Fork 102
feat: Add set node account id method #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add set node account id method #362
Conversation
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
…xamples Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @accepaluni please remember to pre-fix your PR title eg
feat: add set node account id method
additionally, we now have a changelog, which must be updated with each PR
|
Hi @aceppaluni, |
|
Hi @nadineloepfe Yes, my apologies. |
|
Please push the new changes if you are happy with them and lets run the tests here 👍 |
|
@exploreriii I pushed the changes and it corrected those first few failing tests. Seems as though another is failing : test_query_retry_on_busy |
|
Hi! @nadineloepfe @exploreriii , |
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aceppaluni looking at https://github.com/hiero-ledger/hiero-sdk-python/pull/362/files
it is clear that you've not added the new functionality, please try to copy/paste it again now that a rebase isn't required, it should work easier
There are also errors such as deleted lines from a rebase - sorry!!
|
@exploreriii |
|
try it again please and see if it works 👍 |
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So some of the content in the PR differs from Nadine's pR
https://github.com/hiero-ledger/hiero-sdk-python/pull/853/files#diff-0600439f79ba6386f80cba2dba2dfebdf084869ebbf9943cc3eaf0cad9fd013a
not sure how that happened, but it is different
Some files are the same, meaning maybe only some things were copied over?
src/hiero_sdk_python/query/query.py
Outdated
| self.operator = self.operator or client.operator | ||
| self.node_account_ids = list(set(self.node_account_ids)) | ||
|
|
||
| if not getattr(self, "node_account_ids", None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i notice you have added line 110 to 112 compared to Nadine's version
| # and ensures that the correct signatures are used when submitting transactions | ||
| self._signature_map: dict[bytes, basic_types_pb2.SignatureMap] = {} | ||
| # changed from int: 2_000_000 to Hbar: 0.02 | ||
| self._default_transaction_fee = Hbar(0.02) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all this section is different to Nadine's version too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def __init__(self) -> None:
"""
Initializes a new Transaction instance with default values.
"""
super().__init__()
self.transaction_id = None
self.transaction_fee: int | None = None
self.transaction_valid_duration = 120
self.generate_record = False
self.memo = ""
self.custom_fee_limits: list[CustomFeeLimit] = []
# Maps each node's AccountId to its corresponding transaction body bytes
# This allows us to maintain separate transaction bodies for each node
# which is necessary in case node is unhealthy and we have to switch it with other node.
# Each transaction body has the AccountId of the node it's being submitted to.
# If these do not match `INVALID_NODE_ACCOUNT` error will occur.
self._transaction_body_bytes: dict[AccountId, bytes] = {}
# Maps transaction body bytes to their associated signatures
# This allows us to maintain the signatures for each unique transaction
# and ensures that the correct signatures are used when submitting transactions
self._signature_map: dict[bytes, basic_types_pb2.SignatureMap] = {}
self._default_transaction_fee = 2_000_000
self.operator_account_id = None
self.batch_key: Optional[PrivateKey] = None
|
@exploreriii I've copied the files but the workflow is not passing locally. |
|
ok, would suggest to push so we can see what is going on |
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
…election Signed-off-by: Angelina <aceppaluni@gmail.com>
…ion flow (hiero-ledger#362) Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
a0f96ad to
c60399f
Compare
|
Hi, this is WorkflowBot.
|
|
@nadineloepfe We are now down to one failing check. I am not certain as to why as the files were copied the same. |
|
Hi @aceppaluni : you're commits have been preserved, so you still got the sign off for your work. I therefore close this PR now. |
|
@nadineloepfe Thank you! Could you tell me what was done to fix the final check? I am trying to take a look but only see changes to the CHANGELOG and had wanted to take it as a learning opportunity :) |
Description:
Add Set_node_account_ids() method to Query and Transaction for retrieving receipts or records.
Related issue(s):
Fixes #86
Notes for reviewer:
Ran tests for both Query and Transaction
Checklist